-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kidroca/onyx cache cleanup #79
Kidroca/onyx cache cleanup #79
Conversation
I found an issue: Lines 683 to 687 in 4f341cf
react-native-onyx/lib/OnyxCache.js Lines 100 to 106 in 4f341cf
This also reviews a small secondary issue - data can be merged to cache even when there are no subscribers for a given object |
Updated. Added a fix for the above issue |
Regarding
The above goal can be achieved if we skip merging keys that are not already in cache But this is also the weak point of this strategy as we know for a fact that the collection is going to be used shortly, and if we don't store it in cache it will be read from file Should I update this with the logic to skip the collection keys that do not already exist in cache? Here's what actually happens for clean startup in practice
|
Not sure I entirely follow the explanation above or the consequences. But I would maybe just err on the side of caution and add the values to the cache whether they have active subscribers or not 🤷♂️ |
@marcaaron @Jag96 @roryabraham
Details
Address some NAB leftovers from #76
Related Issues
#63, Expensify/App#2762
Automated Tests
Cache tests were updated to require AsyncStorage in the before each block
Linked PRs
Expensify/App#3423